package com.lgq.demo.common.model;

import com.jfinal.plugin.activerecord.Page;
import com.lgq.demo.common.model.base.BaseBlog;
import org.apache.log4j.Logger;

/**
 * 博客
 * Created by liguoqing on 2016/4/26.
 */
public class Blog extends BaseBlog<Blog> {

    public static final Blog dao = new Blog();

    private static final Logger logger = Logger.getLogger(Blog.class);


    /**
     * 所有 sql 与业务逻辑写在 Model 或 Service 中，不要写在 Controller 中，养成好习惯，有利于大型项目的开发与维护
     */
    public Page<Blog> paginate(int pageNumber, int pageSize) {
        return paginate(pageNumber, pageSize, "select *", "from blog order by id asc");
    }
}
